SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 33797: An error occurs when you update an SQL Server table that contains triggers

DetailsAboutRate It

When you use SAS/ACCESS® Interface to Microsoft SQL Server to update an SQL Server table that contains triggers, the following error is returned:

ERROR: CLI cursor fetch error: [DataDirect][ODBC SQL Server
Driver]Connection is busy with results for another hstmt

This error occurs because an update trigger that is defined in the SQL Server table generates multiple results during the update process.

The SQL Server database only permits one active statement per connection, and an active result (most like a row count) might already exist. As a result, the next fetch to process the next update returns the error message.

As a workaround, you can use the following SQL Server option at the top of the trigger code:

set nocount on


Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemSAS/ACCESS Interface to Microsoft SQL Server64-bit Enabled Solaris9.2 TS1M09.3 TS1M0
HP-UX IPF9.2 TS1M09.3 TS1M0
Linux for x649.2 TS1M09.3 TS1M0
64-bit Enabled HP-UX9.2 TS1M09.3 TS1M0
64-bit Enabled AIX9.2 TS1M09.3 TS1M0
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.